]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dbusServices/extensions: Check earlier for existing dialog
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 9 Jul 2023 22:00:04 +0000 (00:00 +0200)
committerMarge Bot <marge-bot@gnome.org>
Sat, 15 Jul 2023 11:07:12 +0000 (11:07 +0000)
There is no point in making a D-Bus call if we are going to bail
out anyway.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2832>

js/dbusServices/extensions/extensionsService.js

index ab31a6485b5b96c8f8dadb30d00882322413ef19..4ef58babf2807e208f62457c1c55615dfa9b46da 100644 (file)
@@ -114,11 +114,10 @@ export const ExtensionsService = class extends ServiceImplementation {
         const [uuid, parentWindow, options] = params;
 
         try {
-            const [serialized] = await this._proxy.GetExtensionInfoAsync(uuid);
-
             if (this._prefsDialog)
                 throw new Error('Already showing a prefs dialog');
 
+            const [serialized] = await this._proxy.GetExtensionInfoAsync(uuid);
             const extension = ExtensionUtils.deserializeExtension(serialized);
 
             this._prefsDialog = new ExtensionPrefsDialog(extension);